package cn.bdqn.controller;


import java.util.ArrayList;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping("user")
public class IndexController{
	
	private List<String> users = new ArrayList<>();

	@RequestMapping("index")
	public String index(@RequestParam(value="username",required=false,defaultValue="test") String username,Map<String,Object> model) {
		users.add(username);
		model.put("users", users);
		return "index";
	}

}
